﻿using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Input;
using FM.Common;
using FM.Events;
using FM.Services;
using FM.录音.Data;
using FM.录音.Events;
using FM.录音.Models;
using FM.录音.Services;
using FM.接口;
using Microsoft.Practices.Prism.Commands;
using Microsoft.Practices.Prism.Logging;
using Microsoft.Practices.Prism.PubSubEvents;
using Microsoft.Practices.Unity;

namespace FM.录音.ViewModels
{
    public class 选项导航ViewModel : Vm基类<配置树1>
    {
        private 配置树服务1 配置树服务;

        public 选项导航ViewModel(IUnityContainer 人事部cs, IEventAggregator 新闻部cs)
        {
            人事部 = 人事部cs;
            新闻部 = 新闻部cs;
            log = 人事部.Resolve<ILoggerFacade>();

            配置树服务 = 人事部.Resolve<配置树服务1>();
            配置树服务.启动();

            Model = 配置树服务.配置树;

            新增Command = new DelegateCommand<object>(配置树服务.新增通道Action);
            删除Command = new DelegateCommand<object>(配置树服务.删除通道Action);
        }


        public ICommand 新增Command { get; set; }
        public ICommand 删除Command { get; set; }
    }
}